-- GENERATED SPELL FOR [Terrorspark] --


function spell0_10078(pUnit, Event) --@Fire Shield,Self--
pUnit:FullCastSpellOnTarget(11968,pUnit)
pUnit:RegisterEvent('Sorts_10078', 633, 1)
end

function spell1_10078(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(9053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10078', 3000, 1)
end

function spell2_10078(pUnit, Event) --@Summon Flamekin Rager,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(15711,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_10078', 1, 1)
end

function spell3_10078(pUnit, Event) --@Summon Flamekin Torcher,Self--
pUnit:FullCastSpellOnTarget(15710,pUnit)
pUnit:RegisterEvent('Sorts_10078', 628, 1)
end

function Sorts_10078(pUnit, Event)
local choix_sorts_10078 = math.random(0, 3)
if choix_sorts_10078 == 0 then
pUnit:RegisterEvent('spell0_10078', 1, 1)
end
if choix_sorts_10078 == 1 then
pUnit:RegisterEvent('spell1_10078', 1, 1)
end
if choix_sorts_10078 == 2 then
pUnit:RegisterEvent('spell2_10078', 1, 1)
end
if choix_sorts_10078 == 3 then
pUnit:RegisterEvent('spell3_10078', 1, 1)
end
end

function mob10078_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10078', math.random(1500, 3000), 1)
end

function mob10078_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10078_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10078_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10078, 1, 'mob10078_Action')
RegisterUnitEvent(10078, 2, 'mob10078_Leave')
RegisterUnitEvent(10078, 3, 'mob10078_Kill')
RegisterUnitEvent(10078, 4, 'mob10078_Die')
